% CS master thesis use SongTi as default font, weird...
\ifthenelse{\equal{\Degree}{graduate}}
{
    \ifthenelse{\equal{\GradLevel}{doctor}}
    {
        % ctex package stores one of "windows", "mac", and "fandol" in \g__ctex_fontset_tl
        \ifthenelse{\equal{\csname g__ctex_fontset_tl\endcsname}{mac}}
        {
            \IfFileExists{ /System/Library/Fonts/PingFang.ttc }
            {
                % MacOS El Capitan and later version
                % https://github.com/CTeX-org/ctex-kit/issues/351
                \setCJKmainfont[BoldFont={Songti SC Bold}]{Songti SC Light}
            }
            {
                % Older MacOS
                % Fonts
                \setCJKmainfont[AutoFakeBold={\FakeBoldSize}]{STSong}
            }
        }
        {
            % Windows or other platform
            \setCJKmainfont[AutoFakeBold={\FakeBoldSize}]{SimSun}
        }
    }
    {} % \equal{\GradLevel}{doctor}
}
{} % \equal{\Degree}{graduate}